import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_study_app/app/router/routers.dart';

class HomePage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(
          'FlutterStudy',
          style: TextStyle(fontSize: 16.sp),
        ),
        centerTitle: true,
      ),
      body: ListView(
        physics: BouncingScrollPhysics(),
        children: [
          Padding(
            padding: EdgeInsets.only(left: 10.w, right: 10.w, top: 10.w),
            child: TextButton(
              style: ButtonStyle(
                backgroundColor: MaterialStateProperty.all(Color(0xff009868)),
              ),
              onPressed: () {
                Routers.navigateTo(context, Routers.visitPage);
              },
              child: Text(
                '日历实例',
                style: TextStyle(color: Colors.white),
              ),
            ),
          ),
          Padding(
            padding: EdgeInsets.only(left: 10.w, right: 10.w, top: 10.w),
            child: TextButton(
              style: ButtonStyle(
                backgroundColor: MaterialStateProperty.all(Color(0xff009868)),
              ),
              onPressed: () {
                Routers.navigateTo(context, Routers.statisticsPage);
              },
              child: Text(
                '数据统计实例',
                style: TextStyle(color: Colors.white),
              ),
            ),
          ),
          Padding(
            padding: EdgeInsets.only(left: 10.w, right: 10.w, top: 10.w),
            child: TextButton(
              style: ButtonStyle(
                backgroundColor: MaterialStateProperty.all(Color(0xff009868)),
              ),
              onPressed: () {
                Routers.navigateTo(context, Routers.returnVisitRecordPage);
              },
              child: Text(
                '回访培训记录',
                style: TextStyle(color: Colors.white),
              ),
            ),
          ),
          Padding(
            padding: EdgeInsets.only(left: 10.w, right: 10.w, top: 10.w),
            child: TextButton(
              style: ButtonStyle(
                backgroundColor: MaterialStateProperty.all(Color(0xff009868)),
              ),
              onPressed: () {
                Routers.navigateTo(context, Routers.marketingSectionPage);
              },
              child: Text(
                '营销专区',
                style: TextStyle(color: Colors.white),
              ),
            ),
          ),
          Padding(
            padding: EdgeInsets.only(left: 10.w, right: 10.w, top: 10.w),
            child: TextButton(
              style: ButtonStyle(
                backgroundColor: MaterialStateProperty.all(Color(0xff009868)),
              ),
              onPressed: () {
                Routers.navigateTo(context, Routers.questionnaireCreatePage);
              },
              child: Text(
                '创建问卷',
                style: TextStyle(color: Colors.white),
              ),
            ),
          ),
          Padding(
            padding: EdgeInsets.only(left: 10.w, right: 10.w, top: 10.w),
            child: TextButton(
              style: ButtonStyle(
                backgroundColor: MaterialStateProperty.all(Color(0xff009868)),
              ),
              onPressed: () {
                Routers.navigateTo(context, Routers.checkVisitRecordPage);
              },
              child: Text(
                '检查内容记录',
                style: TextStyle(color: Colors.white),
              ),
            ),
          ),
          Padding(
            padding: EdgeInsets.only(left: 10.w, right: 10.w, top: 10.w),
            child: TextButton(
              style: ButtonStyle(
                backgroundColor: MaterialStateProperty.all(Color(0xff009868)),
              ),
              onPressed: () {
                Routers.navigateTo(context, Routers.caseClearListPage);
              },
              child: Text(
                '立案清算',
                style: TextStyle(color: Colors.white),
              ),
            ),
          ),
          Padding(
            padding: EdgeInsets.only(left: 10.w, right: 10.w, top: 10.w),
            child: TextButton(
              style: ButtonStyle(
                backgroundColor: MaterialStateProperty.all(Color(0xff009868)),
              ),
              onPressed: () {
                Routers.navigateTo(context, Routers.archivesStatisticsPage);
              },
              child: Text(
                '档案统计',
                style: TextStyle(color: Colors.white),
              ),
            ),
          ),
          Padding(
            padding: EdgeInsets.only(left: 10.w, right: 10.w, top: 10.w),
            child: TextButton(
              style: ButtonStyle(
                backgroundColor: MaterialStateProperty.all(Color(0xff009868)),
              ),
              onPressed: () {
                Routers.navigateTo(context, Routers.imageWatermarkPage);
              },
              child: Text(
                '图片加水印',
                style: TextStyle(color: Colors.white),
              ),
            ),
          ),
        ],
      ),
    );
  }
}
